<form id="show-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" style="width:70%;">

    {foreach name="rows" item="row"}

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{$row.title}:</label>
        <div class="col-xs-12 col-sm-8">
            {if($row.type=='input')}
                {if($row.options)}
                {:build_select('row['.$row['name'].']',$row['options'],$row.value)}

                {else /}
                <input  {if($row.requireswitch)} data-rule="required" {/if} class="form-control" name="row[{$row.name}]" type="text" value="{$row.value}" >
                {/if}

            {/if}

            {if($row.type=='number')}
            <input  {if($row.requireswitch)} data-rule="required" {/if} class="form-control" name="row[{$row.name}]" type="number" value="{$row.value}" >
            {/if}

            {if($row.type=='text')}
            <textarea  {if($row.requireswitch)} data-rule="required" {/if} class="form-control editor" name="row[{$row.name}]" >{$row.value}</textarea>
            {/if}

            {if($row.type=='image')}
            <div class="input-group">
                <input id="c-image-{$row.name}" class="form-control" size="50" name="row[{$row.name}]" type="text" value="{$row.value}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-image-{$row.name}" class="btn btn-danger plupload" data-input-id="c-image-{$row.name}" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image-{$row.name}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image-{$row.name}" class="btn btn-primary fachoose" data-input-id="c-image-{$row.name}" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image-{$row.name}"></ul>

            {/if}

            {if($row.type=='file')}
            <div class="input-group">
                <input id="c-file-{$row.name}" class="form-control" size="50" name="row[{$row.name}]" type="text" value="{$row.value}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-file-{$row.name}" class="btn btn-danger plupload" data-input-id="c-file-{$row.name}" data-mimetype="*" data-multiple="false" data-preview-id="p-file-{$row.name}"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-file-{$row.name}" class="btn btn-primary fachoose" data-input-id="c-file-{$row.name}" data-mimetype="*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-file-{$row.name}"></ul>

            {/if}
        </div>
    </div>

    {/foreach}


    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
